{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nfunction TabNode(_ref) {\n  var _classNames;\n  var prefixCls = _ref.prefixCls,\n    id = _ref.id,\n    active = _ref.active,\n    _ref$tab = _ref.tab,\n    key = _ref$tab.key,\n    label = _ref$tab.label,\n    disabled = _ref$tab.disabled,\n    closeIcon = _ref$tab.closeIcon,\n    closable = _ref.closable,\n    renderWrapper = _ref.renderWrapper,\n    removeAriaLabel = _ref.removeAriaLabel,\n    editable = _ref.editable,\n    onClick = _ref.onClick,\n    onFocus = _ref.onFocus,\n    style = _ref.style;\n  var tabPrefix = \"\".concat(prefixCls, \"-tab\");\n  var removable = editable && closable !== false && !disabled;\n  function onInternalClick(e) {\n    if (disabled) {\n      return;\n    }\n    onClick(e);\n  }\n  function onRemoveTab(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    editable.onEdit('remove', {\n      key: key,\n      event: event\n    });\n  }\n  var node = /*#__PURE__*/React.createElement(\"div\", {\n    key: key // ref={ref}\n    ,\n\n    \"data-node-key\": key,\n    className: classNames(tabPrefix, (_classNames = {}, _defineProperty(_classNames, \"\".concat(tabPrefix, \"-with-remove\"), removable), _defineProperty(_classNames, \"\".concat(tabPrefix, \"-active\"), active), _defineProperty(_classNames, \"\".concat(tabPrefix, \"-disabled\"), disabled), _classNames)),\n    style: style,\n    onClick: onInternalClick\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    role: \"tab\",\n    \"aria-selected\": active,\n    id: id && \"\".concat(id, \"-tab-\").concat(key),\n    className: \"\".concat(tabPrefix, \"-btn\"),\n    \"aria-controls\": id && \"\".concat(id, \"-panel-\").concat(key),\n    \"aria-disabled\": disabled,\n    tabIndex: disabled ? null : 0,\n    onClick: function onClick(e) {\n      e.stopPropagation();\n      onInternalClick(e);\n    },\n    onKeyDown: function onKeyDown(e) {\n      if ([KeyCode.SPACE, KeyCode.ENTER].includes(e.which)) {\n        e.preventDefault();\n        onInternalClick(e);\n      }\n    },\n    onFocus: onFocus\n  }, label), removable && /*#__PURE__*/React.createElement(\"button\", {\n    type: \"button\",\n    \"aria-label\": removeAriaLabel || 'remove',\n    tabIndex: 0,\n    className: \"\".concat(tabPrefix, \"-remove\"),\n    onClick: function onClick(e) {\n      e.stopPropagation();\n      onRemoveTab(e);\n    }\n  }, closeIcon || editable.removeIcon || '×'));\n  return renderWrapper ? renderWrapper(node) : node;\n}\nexport default TabNode;","map":{"version":3,"names":["_defineProperty","classNames","KeyCode","React","TabNode","_ref","_classNames","prefixCls","id","active","_ref$tab","tab","key","label","disabled","closeIcon","closable","renderWrapper","removeAriaLabel","editable","onClick","onFocus","style","tabPrefix","concat","removable","onInternalClick","e","onRemoveTab","event","preventDefault","stopPropagation","onEdit","node","createElement","className","role","tabIndex","onKeyDown","SPACE","ENTER","includes","which","type","removeIcon"],"sources":["/data/messenger.client/node_modules/rc-tabs/es/TabNavList/TabNode.js"],"sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\n\nfunction TabNode(_ref) {\n  var _classNames;\n\n  var prefixCls = _ref.prefixCls,\n      id = _ref.id,\n      active = _ref.active,\n      _ref$tab = _ref.tab,\n      key = _ref$tab.key,\n      label = _ref$tab.label,\n      disabled = _ref$tab.disabled,\n      closeIcon = _ref$tab.closeIcon,\n      closable = _ref.closable,\n      renderWrapper = _ref.renderWrapper,\n      removeAriaLabel = _ref.removeAriaLabel,\n      editable = _ref.editable,\n      onClick = _ref.onClick,\n      onFocus = _ref.onFocus,\n      style = _ref.style;\n  var tabPrefix = \"\".concat(prefixCls, \"-tab\");\n  var removable = editable && closable !== false && !disabled;\n\n  function onInternalClick(e) {\n    if (disabled) {\n      return;\n    }\n\n    onClick(e);\n  }\n\n  function onRemoveTab(event) {\n    event.preventDefault();\n    event.stopPropagation();\n    editable.onEdit('remove', {\n      key: key,\n      event: event\n    });\n  }\n\n  var node = /*#__PURE__*/React.createElement(\"div\", {\n    key: key // ref={ref}\n    ,\n    \"data-node-key\": key,\n    className: classNames(tabPrefix, (_classNames = {}, _defineProperty(_classNames, \"\".concat(tabPrefix, \"-with-remove\"), removable), _defineProperty(_classNames, \"\".concat(tabPrefix, \"-active\"), active), _defineProperty(_classNames, \"\".concat(tabPrefix, \"-disabled\"), disabled), _classNames)),\n    style: style,\n    onClick: onInternalClick\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    role: \"tab\",\n    \"aria-selected\": active,\n    id: id && \"\".concat(id, \"-tab-\").concat(key),\n    className: \"\".concat(tabPrefix, \"-btn\"),\n    \"aria-controls\": id && \"\".concat(id, \"-panel-\").concat(key),\n    \"aria-disabled\": disabled,\n    tabIndex: disabled ? null : 0,\n    onClick: function onClick(e) {\n      e.stopPropagation();\n      onInternalClick(e);\n    },\n    onKeyDown: function onKeyDown(e) {\n      if ([KeyCode.SPACE, KeyCode.ENTER].includes(e.which)) {\n        e.preventDefault();\n        onInternalClick(e);\n      }\n    },\n    onFocus: onFocus\n  }, label), removable && /*#__PURE__*/React.createElement(\"button\", {\n    type: \"button\",\n    \"aria-label\": removeAriaLabel || 'remove',\n    tabIndex: 0,\n    className: \"\".concat(tabPrefix, \"-remove\"),\n    onClick: function onClick(e) {\n      e.stopPropagation();\n      onRemoveTab(e);\n    }\n  }, closeIcon || editable.removeIcon || '×'));\n  return renderWrapper ? renderWrapper(node) : node;\n}\n\nexport default TabNode;"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,OAAO,CAACC,IAAI,EAAE;EACrB,IAAIC,WAAW;EAEf,IAAIC,SAAS,GAAGF,IAAI,CAACE,SAAS;IAC1BC,EAAE,GAAGH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